-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Port #[target_feature]
to new attribute parsing infrastructure
#142876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This should probably bump the rustdoc JSON cc @aDotInTheVoid purely for awareness |
Ah, I missed it because it's not part of the tests for rustdoc-json. I'll make sure to give this attribute the nice formatting too, and to bump the FORMAT_VERSION |
You are my favorite person! Just noting that this attribute has three valid forms:
I believe any mix of these is also legal. For nice formatting, I don't have strong feelings how we normalize so long as we do normalize if at all possible. The last form is the most compact and IIRC how the attribute is explained in the docs, so all else equal that's what I'd pick if I were choosing. But feel free to do whatever is easiest. And yes, entirely reasonable to miss it since we never tested it. We never tested it because it's only the new cargo-semver-checks releasing ~this week that uses it :) |
I encountered these the hard way when writing the attribute :p I discover so much about Rust when doing these refactorings |
8dd448b
to
34dd949
Compare
These commits modify Please ensure that if you've changed the output:
cc @aDotInTheVoid, @obi1kenobi These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
This push should fix the pretty printing for rustdoc. Thanks for the feedback <3 |
I think normalizing to an already-valid form doesn't need to bump the format version, since any downstream consumers would have had to be able to handle it already. |
@rustbot ready |
|
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
34dd949
to
c14ebc4
Compare
☔ The latest upstream changes (presumably #142878) made this pull request unmergeable. Please resolve the merge conflicts. |
c14ebc4
to
33e67cb
Compare
Fixed the issues above & rebased on master |
☔ The latest upstream changes (presumably #142901) made this pull request unmergeable. Please resolve the merge conflicts. |
1256cdd
to
15f0320
Compare
15f0320
to
fd6da8f
Compare
Some changes occurred to constck cc @fee1-dead Some changes occurred to the CTFE machinery |
This comment has been minimized.
This comment has been minimized.
fd6da8f
to
7605dad
Compare
☔ The latest upstream changes (presumably #143338) made this pull request unmergeable. Please resolve the merge conflicts. |
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
7605dad
to
3d5d72b
Compare
^ Rebased |
@bors r+ |
…ser, r=oli-obk Port `#[target_feature]` to new attribute parsing infrastructure Ports `target_feature` to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? `@jdonszelmann`
Rollup of 6 pull requests Successful merges: - #134006 (setup typos check in CI) - #142876 (Port `#[target_feature]` to new attribute parsing infrastructure) - #143038 (avoid suggesting traits from private dependencies) - #143083 (Fix rustdoc not correctly showing attributes on re-exports) - #143283 (document optional jobs) - #143329 (minicore: use core's `diagnostic::on_unimplemented` messages) Failed merges: - #143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142876 - JonathanBrouwer:target_feature_parser, r=oli-obk Port `#[target_feature]` to new attribute parsing infrastructure Ports `target_feature` to the new attribute parsing infrastructure for #131229 (comment) r? ``@jdonszelmann``
Rollup of 6 pull requests Successful merges: - rust-lang/rust#134006 (setup typos check in CI) - rust-lang/rust#142876 (Port `#[target_feature]` to new attribute parsing infrastructure) - rust-lang/rust#143038 (avoid suggesting traits from private dependencies) - rust-lang/rust#143083 (Fix rustdoc not correctly showing attributes on re-exports) - rust-lang/rust#143283 (document optional jobs) - rust-lang/rust#143329 (minicore: use core's `diagnostic::on_unimplemented` messages) Failed merges: - rust-lang/rust#143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang/rust#134006 (setup typos check in CI) - rust-lang/rust#142876 (Port `#[target_feature]` to new attribute parsing infrastructure) - rust-lang/rust#143038 (avoid suggesting traits from private dependencies) - rust-lang/rust#143083 (Fix rustdoc not correctly showing attributes on re-exports) - rust-lang/rust#143283 (document optional jobs) - rust-lang/rust#143329 (minicore: use core's `diagnostic::on_unimplemented` messages) Failed merges: - rust-lang/rust#143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
Ports
target_feature
to the new attribute parsing infrastructure for #131229 (comment)r? @jdonszelmann